package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"qimao/api/internal/config"
	"qimao/qimaorpc/qimaorpc"
	"qimao/qimaorpc/qimaorpcclient"
)

type ServiceContext struct {
	Config config.Config
	qimaorpc.QimaorpcClient
	qimaorpc qimaorpcclient.Qimaorpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		qimaorpc: qimaorpcclient.NewQimaorpc(zrpc.MustNewClient(c.QimaoRpc)),
	}
}
